package com.imufe.chemicalenterprisedangerwarning.entity.query;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.imufe.chemicalenterprisedangerwarning.annotation.ExistId;
import com.imufe.chemicalenterprisedangerwarning.mapper.RegionMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author BaiBan
 * @since 2022/9/23
 */

@ApiModel("安监局请求参数")
@Data
public class SafetySupervisionBureauQuery {

    @ApiModelProperty(value = "安监局编号")
    @Null(message = "创建时安监局编号不能填", groups = CreateGroup.class)
    @NotNull(message = "修改时项目安监局编号必须填", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty("安监局名称")
    private String name;

    @ApiModelProperty("安监局简介")
    private String introduction;

    @ApiModelProperty("所属区域编号")
    @ExistId(message = "区域不存在，请选择正确的区域", groups = CreateGroup.class, value = RegionMapper.class)
    private Long regionId;
}